'use strict'

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    const { INTEGER, TEXT, DATE } = Sequelize
    await queryInterface.createTable('product_detail', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: INTEGER
      },
      content: {
        type: TEXT,
        allowNull: false,
        comment: '文章内容'
      },
      created_at: DATE,
      updated_at: DATE
    })
  },

  async down(queryInterface) {
    queryInterface.dropTable('product_detail')
  }
}
